package cate.game.role.farm.island.cell;

import cate.common.table.d.GDIsland;
import cate.game.role.bag.hero.Hero;
import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;

import java.util.List;

@NoteClass(value = "摘星楼")
public class AidHeroCell extends IslandCell {

    public AidHeroCell() {
        this.type = GDIsland.CellType.AID_HERO;
    }

    @NoteField(value = "援助英雄")
    public List<Hero> heros;

    public AidHeroCell setHeros(List<Hero> heros) {
        this.heros = heros;
        return this;
    }

    public Hero getHeroByIndex(int index) {
        if (heros.size() > index && index >= 0) {
            return heros.get(index);
        }
        return null;
    }

    @Override
    public String toString() {
        return super.toString() + "摘星楼";
    }
}
